package com.qf.service.impl;

import com.qf.mapper.PermissionMapper;
import com.qf.pojo.Permission;
import com.qf.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 作者：冯国清
 * 项目名：com.qf.service.impl
 * 时间：2020/8/19 21:38
 * 描述:
 */
@Service
public class PermissionServiceImpl implements PermissionService {
 @Resource
    PermissionMapper permissionMapper;
    @Override
    public List<Permission> getAllPermissionsByUsernae(String username) {
        return permissionMapper.getAllPermissionsByUsernae(username);
    }

    @Override
    public Permission findPermissionBypid(int pid) {
        return permissionMapper.findPermissionBypid(pid);
    }

    @Override
    public int add(Permission permission) {
        return permissionMapper.add(permission);
    }

    @Override
    public int update(Permission permission) {
        return permissionMapper.update(permission);
    }

    @Override
    public int delete(int pid) {
        return permissionMapper.delete(pid);
    }

    @Override
    public List<Permission> getAllPermission() {
        return permissionMapper.getAllPermission();
    }
}
